#include "global.h"
#include "hBitStr.h"

std::ostream& operator<<(std::ostream& os, const hBitStr& str) { return str.fillOs(os); }
std::ostream& operator<<(std::ostream& os, const hBitView& str) { return str.fillOs(os); }

namespace _hBitStrDetail
{
	std::ostream& Bit8::fillOs(std::ostream& os) const
	{
		for (uint8_t i = 0; i < 8; ++i)
		{
			if (i == 4)
				os << " ";

			os << (uint16_t)operator[](i);
		}

		return os;
	}
}